package com.dodoke.util;

public class ArraysUtils {
    private ArraysUtils(){}

    //静态声明toString方法
    public static String toString(int[] a){
       
        StringBuilder res = new StringBuilder("[");
        for (int item : a) {
            res.append(item).append(",");
        }
        res.append("]");
        return res.toString();
    }

    //静态声明平均数方法
    public static double getAverage(int[] a){
        int sum = 0;
        for (double item : a) {
            sum+=item;
        }
        return sum/a.length;
    }

}
